package com.ctshk.sapp.scenic.controller;


import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.scenic.dto.AirshowProductDTO;
import com.ctshk.rpc.scenic.req.AirshowProductListReq;
import com.ctshk.rpc.scenic.req.AirshowProductReq;
import com.ctshk.rpc.scenic.service.IAirshowProductReserveService;
import com.ctshk.rpc.scenic.service.IAirshowProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-06-10
 */
@RestController
@RequestMapping("/airshow-product-reserve")
@Api(value="航展产品预订查询服务", tags="航展产品预订查询服务")
public class AirshowProductReserveController extends BaseController {

    @DubboReference
    private IAirshowProductReserveService iAirshowProductReserveService;

    @ApiOperation(value="查询套票产品列表", notes="查询套票产品列表")
    @PostMapping("/get-product-list-by-params")
    public PageResponse<AirshowProductDTO> getProductListByParams(@RequestBody AirshowProductListReq airshowProductReq){
        return iAirshowProductReserveService.getProductListByParams(airshowProductReq,getCurrentUser(getRequest()));
    }

    @ApiOperation(value="查询API产品列表", notes="查询API产品列表")
    @PostMapping("/get-ticket-list")
    public Result getTicketList(){
        return iAirshowProductReserveService.getTicketList(getCurrentUser(getRequest()));
    }

}
